package com.lzg.extend;

import android.app.Activity;
import android.graphics.Bitmap;

import com.lzy.ProgressDialogManager;
import com.lzy.okgo.callback.BitmapCallback;
import com.lzy.okgo.request.base.Request;

public abstract class BitmapDialogCallback extends BitmapCallback {

    private ProgressDialogManager mProgressManager;

    public BitmapDialogCallback(Activity activity) {
        super(1000, 1000);
        mProgressManager = new ProgressDialogManager(activity);
    }

    @Override
    public void onStart(Request<Bitmap, ? extends Request> request) {
        mProgressManager.show();
    }

    @Override
    public void onFinish() {
        mProgressManager.dismiss();
    }
}
